#pragma once
#include <DL_COM.h>
#include <Unpacking.h>

union _INPUT_OPT_
{
	struct
	{
		SHORT	cap;
		SHORT	num;
	}			async;
	struct
	{
		SHORT	create;
		SHORT	idx;
	}			gamepad;
};

struct _INPUT_CONF_
{
	Unpacking::UNPACK_FUNC*		input;
	BOOL*						_3d;
	std::function<void(void)>	func;
};

class Input_Process : public DL_COM
{
protected:
	Input_Process() = default;
public:
	using _INPUT_FUNCTION_ = std::function<void (_INPUT_DESC_&, BOOL)>;
	virtual ~Input_Process() = default;
	virtual DL_RET exec(DL_CMD, DL_PARAM_IN = nullptr) = 0;
};

struct _INPUT_HANDLE_OUT_
{
	Input_Process::_INPUT_FUNCTION_ func;
	std::shared_mutex*				mutex_ptr;
	_MT_SAFE_<RECT>*				rect_ptr;
};